# 导包
from selenium import webdriver
from selenium.webdriver.common.by import By
from time import sleep

# 获取浏览器驱动
driver = webdriver.Firefox()
# 打开测试的页面
url = 'file:///C:/Users/tedu/Desktop/NSD2407/html/registerA.html'
driver.get(url)
# 通过NAME定位
# 定位用户名
username = driver.find_element(By.NAME, 'userA')
username.send_keys('admin')
# 定位密码，电话，邮箱并输入值
password = driver.find_element(By.NAME, 'passwordA')
password.send_keys('123456')
tel = driver.find_element(By.NAME, 'telA')
tel.send_keys('19988889999')
email = driver.find_element(By.NAME, 'emailA')
email.send_keys('123@qq.com')
# 关闭
sleep(3)
driver.quit()